package com.prokarma.pkmst.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.prokarma.pkmst.model.Deliver;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
 * Response class to be returned by Api
 * @author pkmst
 *
 */
/**
 * 客户端申请发送短信
 */
@ApiModel(description = "客户端申请发送短信")

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaPKMSTServerCodegen", date = "2021-01-17T02:02:42.424Z")

public class DeliverRequest   {
  /**
   * 请求类型
   */
  public enum CmdTypeEnum {
    DELIVERY("Delivery");

    private String value;

    CmdTypeEnum(String value) {
      this.value = value;
    }

    @Override
    @JsonValue
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static CmdTypeEnum fromValue(String text) {
      for (CmdTypeEnum b : CmdTypeEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("CmdType")
  private CmdTypeEnum cmdType = null;

  @JsonProperty("Data")
  
  private List<Deliver> data = null;

  public DeliverRequest cmdType(CmdTypeEnum cmdType) {
    this.cmdType = cmdType;
    return this;
  }

   /**
   * 请求类型
   * @return cmdType
  **/
  @ApiModelProperty(value = "请求类型")
  public CmdTypeEnum getCmdType() {
    return cmdType;
  }

  public void setCmdType(CmdTypeEnum cmdType) {
    this.cmdType = cmdType;
  }

  public DeliverRequest data(List<Deliver> data) {
    this.data = data;
    return this;
  }

  public DeliverRequest addDataItem(Deliver dataItem) {
    if (this.data == null) {
      this.data = new ArrayList<>();
    }
    this.data.add(dataItem);
    return this;
  }

   /**
   * Deliver
   * @return data
  **/
  @ApiModelProperty(value = "Deliver")
  public List<Deliver> getData() {
    return data;
  }

  public void setData(List<Deliver> data) {
    this.data = data;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DeliverRequest deliverRequest = (DeliverRequest) o;
    return Objects.equals(this.cmdType, deliverRequest.cmdType) &&
        Objects.equals(this.data, deliverRequest.data);
  }

  @Override
  public int hashCode() {
    return Objects.hash(cmdType, data);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DeliverRequest {\n");
    
    sb.append("    cmdType: ").append(toIndentedString(cmdType)).append("\n");
    sb.append("    data: ").append(toIndentedString(data)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

